package com.adopapa.nezhacloud.authc.domain;

import com.adopapa.nezhacloud.ddd.codegen.CodeGen;
import com.adopapa.nezhacloud.ddd.domain.BaseUuidEntity;

import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

@Entity
@Table(name = "AUTHC_RESOURCE_PERM")
public class ResourcePerm extends BaseUuidEntity {

	private static final long serialVersionUID = -9203603223609607214L;

	@CodeGen(query = "=")
	@ManyToOne
	@JoinColumn(name = "ROLE_ID")
	private RoleInfo roleInfo;

	@CodeGen(query = "=")
	@ManyToOne
	@JoinColumn(name = "RESOURCE_ID")
	private ResourceInfo resourceInfo;

	public RoleInfo getRoleInfo() {
		return roleInfo;
	}

	public void setRoleInfo(RoleInfo roleInfo) {
		this.roleInfo = roleInfo;
	}

	public ResourceInfo getResourceInfo() {
		return resourceInfo;
	}

	public void setResourceInfo(ResourceInfo resourceInfo) {
		this.resourceInfo = resourceInfo;
	}

}
